
*** Figure 1 ***
local tmin 1870
local tmax 2010
twoway (line Total_Resources_Income_PC_dev YEAR_DATA if COUNTRY_DATA =="United States" ,lcolor(black) lwidth(medthick) lpattern(solid) lcolor(black)) ///
(line Total_Oil_Income_PC_dev YEAR_DATA if COUNTRY_DATA =="United States" ,lcolor(black) lwidth(medthick) lpattern(shortdash) lcolor(black)) ///
if YEAR_DATA >=`tmin' & YEAR_DATA <=`tmax', ytitle("") ytitle("Av. income/cap", size(large) margin(small)) ///
ylabel(#3, glcolor(gs14)) xtitle(YEAR) xtitle(Year, size(large) color(black) margin(small)) xlabel(`tmin'(10)`tmax') legend(on symxsize(medlarge) position(11) colgap(tiny)) ///
xsize(13) ysize(6) graphregion(fcolor(white) lcolor(black) ifcolor(white) ilcolor(white)) xline(1960, lwidth(thick) lcolor(gs8))

*** Figure 2 ***

*[The figure is attached as a seperate file]


*** Figure 3 ***
local tmin 1875
local tmax 2015
twoway (bar leader_fail_dev_tot YEAR_DATA if COUNTRY_DATA =="Argentina" ,lcolor(gs10) fcolor(gs10) lwidth(medium)) ///
if YEAR_DATA >=`tmin' & YEAR_DATA <=`tmax', ytitle("") ytitle("Total number", size(large) margin(small)) ///
ylabel(#4, nogrid) xtitle(YEAR) xtitle(Year, size(large) color(black) margin(small)) xlabel(`tmin'(10)`tmax') legend(off) ///
xsize(10) ysize(6) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) 
graph save devirr1, replace

local tmin 1875
local tmax 2015
twoway (bar leader_fail_dev_prop YEAR_DATA if COUNTRY_DATA =="Argentina" ,lcolor(gs10) fcolor(gs10) lwidth(thin)) ///
if YEAR_DATA >=`tmin' & YEAR_DATA <=`tmax', ytitle("") ytitle("% of all countries", size(large) margin(small)) ///
ylabel(#4, nogrid) xtitle(YEAR) xtitle(Year, size(large) color(black) margin(small)) xlabel(`tmin'(10)`tmax') legend(off) ///
xsize(10) ysize(6) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) 
graph save devirr2, replace

graph combine devirr1.gph devirr2.gph, xsize(10) ysize(6) graphregion(fcolor(white) lcolor(black) ifcolor(white) ilcolor(white)) rows(2) cols(1) imargin(medium)


*** Figure 4 ***
gen div_gdp_52 = div_gdp_5
replace div_gdp_52=round(div_gdp_52, 0.01) 

twoway (connected gdp YEAR_DATA, mcolor(black) msize(small) msymbol(circle) ///
lcolor(black) lwidth(medium)) if COUNTRY_DATA =="Nigeria" & YEAR_DATA >=1977 & YEAR_DATA <=1985, ytitle(GDP/Cap) ytitle(, size(large) ///
color(black) margin(medium)) ylabel(, nogrid) xtitle(Year) xtitle(, size(large) color(black) margin(medium)) xlabel(1977(1)1985) legend(off) ///
xsize(10) ysize(7) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
graph save nig_CT_ill.gph, replace

twoway (connected gdp YEAR_DATA, mcolor(black) msize(small) msymbol(circle) mlabel(div_gdp_52) mlabcolor(black) mlabposition(12) mlabgap(medium) mlabsize(medium) ///
lcolor(black) lwidth(medium)) if COUNTRY_DATA =="Nigeria" & YEAR_DATA >=1977 & YEAR_DATA <=1985, ytitle(GDP/Cap) ytitle(, size(large) ///
color(black) margin(medium)) ylabel(, nogrid) xtitle(Year) xtitle(, size(large) color(black) margin(medium)) xlabel(1977(1)1985) legend(off) ///
xsize(10) ysize(6) graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))
graph save nig_tc.gph, replace

graph combine nig_CT_ill.gph nig_tc.gph, ycommon xsize(20) ysize(7) graphregion(fcolor(white) lcolor(black) ifcolor(white) ilcolor(white)) rows(1)


*** Table 1 ***
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr tsplit i.tsplit#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr tsplit i.tsplit#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.div_gdp_5_lag1 *.tsplit#c.div_gdp_5_neg_lag1 div_gdp_5_lag1  totres_PC_210_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)


* Chow test of structural breaks *
cls
xtreg leader_fail_irr i.tsplit#c.div_gdp_5_lag1 tsplit i.tsplit#c.gdp_ln_lag1 i.tsplit#c.population_ln_lag1 i.tsplit#c.polity2_lag1 i.tsplit#c.cow_cw_inc_lag1 i.tsplit#c.t1_leader_fail_irr_leader i.tsplit#c.t2_leader_fail_irr_leader i.tsplit#c.t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
test (_b[0.tsplit#c.div_gdp_5_lag1] = _b[1.tsplit#c.div_gdp_5_lag1])

cls
xtreg leader_fail_irr i.tsplit#c.div_gdp_5_neg_lag1 tsplit i.tsplit#c.gdp_ln_lag1 i.tsplit#c.population_ln_lag1 i.tsplit#c.polity2_lag1 i.tsplit#c.cow_cw_inc_lag1 i.tsplit#c.t1_leader_fail_irr_leader i.tsplit#c.t2_leader_fail_irr_leader i.tsplit#c.t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
test (_b[0.tsplit#c.div_gdp_5_neg_lag1] = _b[1.tsplit#c.div_gdp_5_neg_lag1])

cls
xtreg leader_fail_irr i.tsplit#c.div_gdp_5_lag1 tsplit i.tsplit#c.gdp_ln_lag1 i.tsplit#c.population_ln_lag1 i.tsplit#c.polity2_lag1 i.tsplit#c.cow_cw_inc_lag1 i.tsplit#c.t1_leader_fail_irr_leader i.tsplit#c.t2_leader_fail_irr_leader i.tsplit#c.t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
test (_b[0.tsplit#c.gdp_ln_lag1] = _b[1.tsplit#c.gdp_ln_lag1]) (_b[0.tsplit#c.population_ln_lag1] = _b[1.tsplit#c.population_ln_lag1]) (_b[0.tsplit#c.polity2_lag1] = _b[1.tsplit#c.polity2_lag1]) (_b[0.tsplit#c.cow_cw_inc_lag1] = _b[1.tsplit#c.cow_cw_inc_lag1]) 

cls
xtreg leader_fail_irr i.tsplit#c.div_gdp_5_neg_lag1 tsplit i.tsplit#c.gdp_ln_lag1 i.tsplit#c.population_ln_lag1 i.tsplit#c.polity2_lag1 i.tsplit#c.cow_cw_inc_lag1 i.tsplit#c.t1_leader_fail_irr_leader i.tsplit#c.t2_leader_fail_irr_leader i.tsplit#c.t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
test (_b[0.tsplit#c.gdp_ln_lag1] = _b[1.tsplit#c.gdp_ln_lag1]) (_b[0.tsplit#c.population_ln_lag1] = _b[1.tsplit#c.population_ln_lag1]) (_b[0.tsplit#c.polity2_lag1] = _b[1.tsplit#c.polity2_lag1]) (_b[0.tsplit#c.cow_cw_inc_lag1] = _b[1.tsplit#c.cow_cw_inc_lag1]) 



*** Figure 5 ***
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if independent ==1 & polity2_lag1 <6, fe cluster(ccode)
margins, dydx(div_gdp_5_lag1) at(totres_PC_210_ln_lag1 =(0 (0.5) 6)) asobserved 
marginsplot, ///
ciopts(color(gs14) lpattern(solid))  recastci(rarea) ///
plotopts(mcolor(black) lpattern(solid) lwidth(medthick) msymbol(none)) ///
scheme(s1mono) ///
level(90) graphregion(fcolor(white) lcolor(white)) yline(0) xlabel(0(1)6) ///
xtitle(Natural resource revenues (log), margin(small)) ytitle(Average marginal effects of crisis, margin(small)) title("") 
graph save main1, replace

xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if independent ==1 & polity2_lag1 <6, fe cluster(ccode)
margins, dydx(div_gdp_5_neg_lag1) at(totres_PC_210_ln_lag1 =(0 (0.5) 6)) asobserved 
marginsplot, ///
ciopts(color(gs14) lpattern(solid))  recastci(rarea) ///
plotopts(mcolor(black) lpattern(solid) lwidth(medthick) msymbol(none)) ///
scheme(s1mono) ///
level(90) graphregion(fcolor(white) lcolor(white)) yline(0) xlabel(0(1)6) ///
xtitle(Natural resource revenues (log), margin(small)) ytitle(Average marginal effects of crisis (≤1), margin(small)) title("") 
graph save main2, replace

graph combine main1.gph main2.gph, xsize(16) ysize(8) graphregion(fcolor(white) lcolor(black) ifcolor(white) ilcolor(white)) rows(1) cols(3) imargin(medium) ycommon


*** Table 2 - Panel A ***
xtset ccode YEAR_DATA
eststo clear
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe
eststo
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5 div_gdp_5_neg)


*** Table 2 - Panel B ***
xtset ccode YEAR_DATA
eststo clear
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 leader_fail_irr_wa_or_410) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5_wa) 

*** Table 3 ***
xtset ccode YEAR_DATA
eststo clear
xtreg tot_res_rev_tot_ln div_gdp_5 totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo
xtreg rev_inc_sc_tot_ln c.div_gdp_5##c.totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo
xtreg physint div_gdp_5 totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo
xtreg domestic9_banks c.div_gdp_5##c.totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe 
eststo
xtreg militaryaid_pc div_gdp_5 totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo
xtreg iirating div_gdp_5 totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(*.YEAR_DATA) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5 totres_PC_210_ln c.div_gdp_5#c.totres_PC_210_ln)


*** Figure 6 ***
graph pie tot_nres_rev_inc_sc_tot tot_res_rev_tot if YEAR_DATA==2010, ///
pie(1, color(gs14)) pie(2, color(gs10)) line(lcolor(black) lwidth(medium)) ///
by(, note(, color(white))) by(, legend(off)) by(, graphregion(fcolor(white) lcolor(white) ifcolor(white) ilcolor(white))) by(rev_sample) subtitle(, nobox) 
graph save mech1a, replace

xtset ccode YEAR_DATA
xtreg rev_inc_sc_tot_ln c.div_gdp_5##c.totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
margins, dydx(div_gdp_5) at(totres_PC_210_ln =(0 (0.5) 6)) asobserved 
marginsplot, ///
ciopts(color(gs14) lpattern(solid))  recastci(rarea) ///
plotopts(mcolor(black) lpattern(solid) lwidth(medthick) msymbol(none)) ///
scheme(s1mono) ///
level(90) graphregion(fcolor(white) lcolor(white)) yline(0) xlabel(0(1)6) ///
xtitle(Natural resource revenues (log), margin(small)) ytitle(Average marginal effects of crisis, margin(small)) title("") 
graph save mech1b, replace

graph combine mech1a.gph mech1b.gph, xsize(17) ysize(7) graphregion(fcolor(white) lcolor(black) ifcolor(white) ilcolor(white)) rows(1) cols(3) imargin(medium)


*** Figure 7 ***
xtset ccode YEAR_DATA
xtreg domestic9_banks c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe 
margins, dydx(div_gdp_5) at(totres_PC_210_ln =(0 (0.5) 6)) asobserved 
marginsplot, ///
ciopts(color(gs14) lpattern(solid))  recastci(rarea) ///
plotopts(mcolor(black) lpattern(solid) lwidth(medthick) msymbol(none)) ///
scheme(s1mono) ///
level(90) graphregion(fcolor(white) lcolor(black)) yline(0) xlabel(0(1)6) ///
xtitle(Natural resource revenues (log), margin(small)) ytitle(Average marginal effects of crisis, margin(small)) title("") 


********************************************************************************
******************************** ONLINE APPENDIX *******************************
********************************************************************************

*** Table A1 ***
xtset ccode YEAR_DATA
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)

eststo clear
estpost tabstat leader_fail_irr div_gdp_5_lag1 div_gdp_5_neg_lag1 totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 ///
polity2_lag1 cow_cw_inc_lag1 tsplit t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader ///
div_gdp_5_wa leader_fail_irr_wa_or_410 tot_res_rev_tot_ln rev_inc_sc_tot_ln physint domestic9_banks militaryaid_pc iirating ///
if e(sample), columns(statistics) statistics(mean sd min max) 

esttab, replace label cells("mean(fmt(2)) sd(fmt(2)) min(fmt(2)) max(fmt(2))") 

*** Table B1 ***
xtset ccode YEAR_DATA
eststo clear

gen tsplit_t = tsplit50
label variable tsplit_t "Temporal split"
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_lag1] = _b[1.tsplit_t#c.div_gdp_5_lag1])
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_neg_lag1] = _b[1.tsplit_t#c.div_gdp_5_neg_lag1])

drop tsplit_t
gen tsplit_t = tsplit55
label variable tsplit_t "Temporal split"
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_lag1] = _b[1.tsplit_t#c.div_gdp_5_lag1])
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_neg_lag1] = _b[1.tsplit_t#c.div_gdp_5_neg_lag1])

drop tsplit_t
gen tsplit_t = tsplit65
label variable tsplit_t "Temporal split"
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_lag1] = _b[1.tsplit_t#c.div_gdp_5_lag1])
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_neg_lag1] = _b[1.tsplit_t#c.div_gdp_5_neg_lag1])


drop tsplit_t
gen tsplit_t = tsplit70
label variable tsplit_t "Temporal split"
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_lag1] = _b[1.tsplit_t#c.div_gdp_5_lag1])
xtreg leader_fail_irr tsplit_t i.tsplit_t#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit_t c.population_ln_lag1#i.tsplit_t c.polity2_lag1#i.tsplit_t c.cow_cw_inc_lag1#i.tsplit_t c.t1_leader_fail_irr_leader#i.tsplit_t c.t2_leader_fail_irr_leader#i.tsplit_t c.t3_leader_fail_irr_leader#i.tsplit_t i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
test (_b[0.tsplit_t#c.div_gdp_5_neg_lag1] = _b[1.tsplit_t#c.div_gdp_5_neg_lag1])


esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(*.tsplit_t#c.t1_leader_fail_irr_leader *.tsplit_t#c.t2_leader_fail_irr_leader *.tsplit_t#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit_t *.tsplit_t#c.div_gdp_5_lag1 *.tsplit_t#c.div_gdp_5_neg_lag1 *.tsplit_t#c.gdp_ln_lag1 *.tsplit_t#c.population_ln_lag1 *.tsplit_t#c.polity2_lag1 *.tsplit_t#c.cow_cw_inc_lag1)



*** Table C1 ***
xtset ccode YEAR_DATA
eststo clear
xtlogit leader_fail_irr tsplit i.tsplit#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr tsplit i.tsplit#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe 
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.div_gdp_5_lag1 *.tsplit#c.div_gdp_5_neg_lag1 div_gdp_5_lag1  totres_PC_210_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)



*** logit models ***
cls
xtset ccode YEAR_DATA
eststo clear
xtlogit leader_fail_irr tsplit i.tsplit#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr tsplit i.tsplit#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe 
eststo
xtlogit leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe 
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.div_gdp_5_lag1 *.tsplit#c.div_gdp_5_neg_lag1 div_gdp_5_lag1  totres_PC_210_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)

esttab using appC_analysis.tex, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) booktabs noomitted eqlabels(none) nodep  ///
order(tsplit *.tsplit#c.div_gdp_5_lag1 *.tsplit#c.div_gdp_5_neg_lag1 div_gdp_5_lag1  totres_PC_210_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)



*** Table D1-D9 ***

* Different values on n *
xtset ccode YEAR_DATA
eststo clear

local t 2
*local t 3
*local t 4
*local t 6
*local t 7
*local t 8

eststo clear
xtreg leader_fail_irr tsplit i.tsplit#c.div_gdp_`t'_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr tsplit i.tsplit#c.div_gdp_`t'_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_`t'_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_`t'_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_`t'_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_`t'_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.div_gdp_`t'_lag1 *.tsplit#c.div_gdp_`t'_neg_lag1 div_gdp_`t'_lag1  totres_PC_210_ln_lag1 c.div_gdp_`t'_lag1#c.totres_PC_210_ln_lag1 div_gdp_`t'_neg_lag1 c.div_gdp_`t'_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)


* Growth 210 *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr tsplit i.tsplit#c.gdp_growth_210_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr tsplit i.tsplit#c.gdp_growth_210_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.gdp_growth_210_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.gdp_growth_210_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.gdp_growth_210_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.gdp_growth_210_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.gdp_growth_210_lag1 *.tsplit#c.gdp_growth_210_neg_lag1 gdp_growth_210_lag1  totres_PC_210_ln_lag1 c.gdp_growth_210_lag1#c.totres_PC_210_ln_lag1 gdp_growth_210_neg_lag1 c.gdp_growth_210_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)

* Peak/Current measure *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr tsplit i.tsplit#c.peak_current_5ret_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr tsplit i.tsplit#c.peak_current_5ret_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.peak_current_5ret_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.peak_current_5ret_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.peak_current_5ret_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.peak_current_5ret_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.peak_current_5ret_lag1 *.tsplit#c.peak_current_5ret_neg_lag1 peak_current_5ret_lag1  totres_PC_210_ln_lag1 c.peak_current_5ret_lag1#c.totres_PC_210_ln_lag1 peak_current_5ret_neg_lag1 c.peak_current_5ret_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)

* Economic slump approach *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr tsplit i.tsplit#c.crisis_ec_3  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr tsplit i.tsplit#c.crisis_ec_3 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.crisis_ec_3##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.crisis_ec_3##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.crisis_ec_3  crisis_ec_3  c.crisis_ec_3#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)



*** Table E1-E4 ***

* Annual resource income *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.YEAR_DATA) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5_lag1 totres_PC_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_ln_lag1)


* Oil *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr c.div_gdp_5_lag1##c.Total_Oil_Income_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.Total_Oil_Income_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.Total_Oil_Income_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.Total_Oil_Income_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.YEAR_DATA) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5_lag1 Total_Oil_Income_PC_210_ln_lag1 c.div_gdp_5_lag1#c.Total_Oil_Income_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.Total_Oil_Income_PC_210_ln_lag1)

* Non-Oil *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr c.div_gdp_5_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.YEAR_DATA) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5_lag1 non_oil_rec_210_ln_lag1 c.div_gdp_5_lag1#c.non_oil_rec_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.non_oil_rec_210_ln_lag1)


* Non-Oil and non-oil sample *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr c.div_gdp_5_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6 & non_oil_tag==1, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6 & non_oil_tag==1, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6 & non_oil_tag==1, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.non_oil_rec_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6 & non_oil_tag==1, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.YEAR_DATA) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5_lag1 non_oil_rec_210_ln_lag1 c.div_gdp_5_lag1#c.non_oil_rec_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.non_oil_rec_210_ln_lag1)


*** Table F1 ***
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_irr tsplit i.tsplit#c.div_gdp_5_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.military_c_lag1#i.tsplit c.party_all_c_lag1#i.tsplit c.monarchy_c_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr tsplit i.tsplit#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.military_c_lag1#i.tsplit c.party_all_c_lag1#i.tsplit c.monarchy_c_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 military_c_lag1 party_all_c_lag1 monarchy_c_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 military_c_lag1 party_all_c_lag1 monarchy_c_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 military_c_lag1 party_all_c_lag1 monarchy_c_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_irr c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 military_c_lag1 party_all_c_lag1 monarchy_c_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.div_gdp_5_lag1 *.tsplit#c.div_gdp_5_neg_lag1 div_gdp_5_lag1  totres_PC_210_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 *.tsplit#c.military_c_lag1 *.tsplit#c.party_all_c_lag1 *.tsplit#c.monarchy_c_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 military_c_lag1 party_all_c_lag1 monarchy_c_lag1)

*** Table G1-G2 ***

* All failures *
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail tsplit i.tsplit#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail tsplit i.tsplit#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.div_gdp_5_lag1 *.tsplit#c.div_gdp_5_neg_lag1 div_gdp_5_lag1  totres_PC_210_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)


* Regular leader failures *
gen leader_fail_nonirr = 0 if leader_fail_irr !=.
replace leader_fail_nonirr = 1 if leader_fail==1 & leader_fail_irr !=1 
xtset ccode YEAR_DATA
eststo clear
xtreg leader_fail_reg tsplit i.tsplit#c.div_gdp_5_lag1  c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_reg tsplit i.tsplit#c.div_gdp_5_neg_lag1 c.gdp_ln_lag1#i.tsplit c.population_ln_lag1#i.tsplit c.polity2_lag1#i.tsplit c.cow_cw_inc_lag1#i.tsplit c.t1_leader_fail_irr_leader#i.tsplit c.t2_leader_fail_irr_leader#i.tsplit c.t3_leader_fail_irr_leader#i.tsplit i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_reg c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_reg c.div_gdp_5_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_reg c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1875 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo
xtreg leader_fail_reg c.div_gdp_5_neg_lag1##c.totres_PC_210_ln_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader i.YEAR_DATA if YEAR_DATA >=1960 & independent ==1 & polity2_lag1 <6, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader *.tsplit#c.t1_leader_fail_irr_leader *.tsplit#c.t2_leader_fail_irr_leader *.tsplit#c.t3_leader_fail_irr_leader *.YEAR_DATA ) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) compress nodep  ///
order(tsplit *.tsplit#c.div_gdp_5_lag1 *.tsplit#c.div_gdp_5_neg_lag1 div_gdp_5_lag1  totres_PC_210_ln_lag1 c.div_gdp_5_lag1#c.totres_PC_210_ln_lag1 div_gdp_5_neg_lag1 c.div_gdp_5_neg_lag1#c.totres_PC_210_ln_lag1 *.tsplit#c.gdp_ln_lag1 *.tsplit#c.population_ln_lag1 *.tsplit#c.polity2_lag1 *.tsplit#c.cow_cw_inc_lag1 gdp_ln_lag1 population_ln_lag1 polity2_lag1 cow_cw_inc_lag1)



*** Table H1 ***

* Panel A *
xtset ccode YEAR_DATA
eststo clear
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe
eststo
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5 = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtivreg2 leader_fail_irr (div_gdp_5_neg = div_gdp_5_wa) gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5 div_gdp_5_neg)


* Panel B *
xtset ccode YEAR_DATA
eststo clear
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==0 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if tsplit==1 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if (tsplit==0 | totres_PC_210_ln_lag1 ==0) & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5 div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo
xtreg div_gdp_5_neg div_gdp_5_wa gdp_ln population_ln polity2 cow_cw_inc  leader_fail_irr_wa_or_410 t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader if totres_PC_210_ln_lag1 >=3.3 & independent ==1 & polity2_lag1 <6, cluster(ccode) fe 
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(t1_leader_fail_irr_leader t2_leader_fail_irr_leader t3_leader_fail_irr_leader gdp_ln population_ln polity2 cow_cw_inc leader_fail_irr_wa_or_410 leader_fail_irr_wa_or_410) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress ///
order(div_gdp_5_wa) 

*** Table I1-I2 ***

* Error correction models *
xtset ccode YEAR_DATA
eststo clear
xtreg d.tot_res_rev_tot_ln d.div_gdp_5 div_gdp_5 d.totres_PC_210_ln totres_PC_210_ln d.gdp_ln gdp_ln d.population_ln population_ln d.polity2 polity2 d.cow_cw_inc cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo
xtreg d.iirating d.div_gdp_5 div_gdp_5 d.totres_PC_210_ln totres_PC_210_ln d.gdp_ln gdp_ln d.population_ln population_ln d.polity2 polity2 d.cow_cw_inc cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(*.YEAR_DATA) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress 


* Alternative model specifications *
xtset ccode YEAR_DATA
eststo clear
xtreg resourcetaxes_tot_ln div_gdp_5 totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe cluster(ccode)
eststo
xtreg banks_prot c.div_gdp_5##c.totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe 
eststo
xtpoisson domestic9_banks c.div_gdp_5##c.totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe 
eststo
xtpoisson banks_prot c.div_gdp_5##c.totres_PC_210_ln gdp_ln population_ln polity2 cow_cw_inc i.YEAR_DATA if independent ==1 & polity2_lag1 <6 & tsplit==1, fe 
eststo

esttab, replace label b(3) se(3) se star(* 0.1 ** 0.05 *** 0.01) ///
drop(*.YEAR_DATA) ///
title(Economic performance and irregular leader removal) noomitted eqlabels(none) nonumbers compress 




